Apg-Cii
Apg Cad Instructions Interpreter

Viewer

Layers

 

Cad test settings

 
Dims and annotations Apg Svg Cad Instr. Interp. -1000 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 0 1000 2000 3000 4000 5000 Annotation Test Multiline Will work? 1393 Algn 500 Vert 1300 Horz 1393 Algn 500 Vert 1300 Horz ~1697 Horz ~1697 Vert ~1697 OutD ~1697 InD ~848.5 OutR ~848.5 InR P1: 500,3500 P2: 1800,3000 P3: 500,1500 P4: 1800,1000 PAD1: 4000,2000 PAD2: 4600,1400 PAD3: 6000,2000 PAD4: 6600,1400 PA1: 1000,100 PA2: 1500,500 Dims and annotations Apg Svg Cad Instr. Interp. 2026-01-29T00:25:31.723Z

Logger

0000 0.00000 0.00000   1    ApgCii.constructor{ 
0001 0.00000 0.00000 1 }
0002 0.00000 0.00000 1 ApgCii.set{
0003 0.00000 0.00000 2 ApgCii.#validateAndSet{
0004 0.00200 0.00200 2 }
0005 0.00200 0.00000 1 }
0006 0.00400 0.00200 1 ApgCii.build{
0007 0.00400 0.00000 2 ApgCii.setupBegin{
0008 0.00400 0.00000 2 > 1: SETUP_BEGIN
0009 0.00400 0.00000 2 }
0010 0.00400 0.00000 2 ApgCii.setName_{
0011 0.00400 0.00000 2 > 2: SET_NAME
0012 0.00400 0.00000 2 }
0013 0.00400 0.00000 2 ApgCii.setupEnd{
0014 0.00400 0.00000 2 > 3: SETUP_END
0015 0.00400 0.00000 2 }
0016 0.00600 0.00200 2 ApgCii.pushLayer_{
0017 0.00600 0.00000 2 > 4: PUSH_LAYER - Layer_Dimensions
0018 0.00600 0.00000 2 }
0019 0.00600 0.00000 2 ApgCii.newPoint_{
0020 0.00600 0.00000 2 > 5: NEW_POINT - P1
0021 0.00600 0.00000 2 }
0022 0.00600 0.00000 2 ApgCii.newPoint_{
0023 0.00600 0.00000 2 > 6: NEW_POINT - P2
0024 0.00600 0.00000 2 }
0025 0.00600 0.00000 2 ApgCii.#drawLinearDim{
0026 0.00600 0.00000 2 > 7: DRAW_LIN_DIM
0027 0.00600 0.00000 3 ApgCii.#get2PointsByNames{
0028 0.00800 0.00200 4 ApgCii.#getPointsByNames{
0029 0.00800 0.00000 4 }
0030 0.00800 0.00000 3 }
0031 0.00800 0.00000 2 }
0032 0.00800 0.00000 2 ApgCii.#drawLinearDim{
0033 0.00800 0.00000 2 > 8: DRAW_LIN_DIM
0034 0.01000 0.00200 3 ApgCii.#get2PointsByNames{
0035 0.01000 0.00000 4 ApgCii.#getPointsByNames{
0036 0.01000 0.00000 4 }
0037 0.01000 0.00000 3 }
0038 0.01000 0.00000 2 }
0039 0.01000 0.00000 2 ApgCii.#drawLinearDim{
0040 0.01000 0.00000 2 > 9: DRAW_LIN_DIM
0041 0.01000 0.00000 3 ApgCii.#get2PointsByNames{
0042 0.01000 0.00000 4 ApgCii.#getPointsByNames{
0043 0.01000 0.00000 4 }
0044 0.01000 0.00000 3 }
0045 0.01200 0.00200 2 }
0046 0.01200 0.00000 2 ApgCii.newPoint_{
0047 0.01200 0.00000 2 > 10: NEW_POINT - P3
0048 0.01200 0.00000 2 }
0049 0.01200 0.00000 2 ApgCii.newPoint_{
0050 0.01200 0.00000 2 > 11: NEW_POINT - P4
0051 0.01200 0.00000 2 }
0052 0.01200 0.00000 2 ApgCii.#drawLinearDim{
0053 0.01200 0.00000 2 > 12: DRAW_LIN_DIM
0054 0.01200 0.00000 3 ApgCii.#get2PointsByNames{
0055 0.01200 0.00000 4 ApgCii.#getPointsByNames{
0056 0.01200 0.00000 4 }
0057 0.01200 0.00000 3 }
0058 0.01400 0.00200 2 }
0059 0.01400 0.00000 2 ApgCii.#drawLinearDim{
0060 0.01400 0.00000 2 > 13: DRAW_LIN_DIM
0061 0.01400 0.00000 3 ApgCii.#get2PointsByNames{
0062 0.01400 0.00000 4 ApgCii.#getPointsByNames{
0063 0.01400 0.00000 4 }
0064 0.01400 0.00000 3 }
0065 0.01400 0.00000 2 }
0066 0.01400 0.00000 2 ApgCii.#drawLinearDim{
0067 0.01400 0.00000 2 > 14: DRAW_LIN_DIM
0068 0.01400 0.00000 3 ApgCii.#get2PointsByNames{
0069 0.01400 0.00000 4 ApgCii.#getPointsByNames{
0070 0.01400 0.00000 4 }
0071 0.01600 0.00200 3 }
0072 0.01600 0.00000 2 }
0073 0.01600 0.00000 2 ApgCii.newPoint_{
0074 0.01600 0.00000 2 > 15: NEW_POINT - PAD1
0075 0.01600 0.00000 2 }
0076 0.01600 0.00000 2 ApgCii.newPoint_{
0077 0.01600 0.00000 2 > 16: NEW_POINT - PAD2
0078 0.01600 0.00000 2 }
0079 0.01600 0.00000 2 ApgCii.#drawArcDim{
0080 0.01600 0.00000 2 > 17: DRAW_ARC_DIM
0081 0.01800 0.00200 3 ApgCii.#get2PointsByNames{
0082 0.01800 0.00000 4 ApgCii.#getPointsByNames{
0083 0.01800 0.00000 4 }
0084 0.01800 0.00000 3 }
0085 0.01800 0.00000 2 }
0086 0.01800 0.00000 2 ApgCii.#drawArcDim{
0087 0.02000 0.00200 2 > 18: DRAW_ARC_DIM
0088 0.02000 0.00000 3 ApgCii.#get2PointsByNames{
0089 0.02000 0.00000 4 ApgCii.#getPointsByNames{
0090 0.02000 0.00000 4 }
0091 0.02000 0.00000 3 }
0092 0.02000 0.00000 2 }
0093 0.02000 0.00000 2 ApgCii.#drawArcDim{
0094 0.02000 0.00000 2 > 19: DRAW_ARC_DIM
0095 0.02000 0.00000 3 ApgCii.#get2PointsByNames{
0096 0.02000 0.00000 4 ApgCii.#getPointsByNames{
0097 0.02000 0.00000 4 }
0098 0.02000 0.00000 3 }
0099 0.02200 0.00200 2 }
0100 0.02200 0.00000 2 ApgCii.#drawArcDim{
0101 0.02200 0.00000 2 > 20: DRAW_ARC_DIM
0102 0.02200 0.00000 3 ApgCii.#get2PointsByNames{
0103 0.02200 0.00000 4 ApgCii.#getPointsByNames{
0104 0.02200 0.00000 4 }
0105 0.02200 0.00000 3 }
0106 0.02200 0.00000 2 }
0107 0.02200 0.00000 2 ApgCii.newPoint_{
0108 0.02200 0.00000 2 > 21: NEW_POINT - PAD3
0109 0.02200 0.00000 2 }
0110 0.02200 0.00000 2 ApgCii.newPoint_{
0111 0.02200 0.00000 2 > 22: NEW_POINT - PAD4
0112 0.02400 0.00200 2 }
0113 0.02400 0.00000 2 ApgCii.#drawArcDim{
0114 0.02400 0.00000 2 > 23: DRAW_ARC_DIM
0115 0.02400 0.00000 3 ApgCii.#get2PointsByNames{
0116 0.02400 0.00000 4 ApgCii.#getPointsByNames{
0117 0.02400 0.00000 4 }
0118 0.02400 0.00000 3 }
0119 0.02400 0.00000 2 }
0120 0.02400 0.00000 2 ApgCii.#drawArcDim{
0121 0.02400 0.00000 2 > 24: DRAW_ARC_DIM
0122 0.02400 0.00000 3 ApgCii.#get2PointsByNames{
0123 0.02400 0.00000 4 ApgCii.#getPointsByNames{
0124 0.02400 0.00000 4 }
0125 0.02600 0.00200 3 }
0126 0.02600 0.00000 2 }
0127 0.02600 0.00000 2 ApgCii.popLayer_{
0128 0.02600 0.00000 2 > 25: POP_LAYER
0129 0.02600 0.00000 2 }
0130 0.02600 0.00000 2 ApgCii.newPoint_{
0131 0.02600 0.00000 2 > 26: NEW_POINT - PA1
0132 0.02600 0.00000 2 }
0133 0.02600 0.00000 2 ApgCii.newPoint_{
0134 0.02600 0.00000 2 > 27: NEW_POINT - PA2
0135 0.02600 0.00000 2 }
0136 0.02600 0.00000 2 ApgCii.pushLayer_{
0137 0.02600 0.00000 2 > 28: PUSH_LAYER - Layer_Zero
0138 0.02800 0.00200 2 }
0139 0.02800 0.00000 2 ApgCii.drawCircle_{
0140 0.02800 0.00000 2 > 29: DRAW_CIRCLE
0141 0.02800 0.00000 2 }
0142 0.02800 0.00000 2 ApgCii.drawCircle_{
0143 0.02800 0.00000 2 > 30: DRAW_CIRCLE
0144 0.02800 0.00000 2 }
0145 0.02800 0.00000 2 ApgCii.popLayer_{
0146 0.02800 0.00000 2 > 31: POP_LAYER
0147 0.02800 0.00000 2 }
0148 0.02800 0.00000 2 ApgCii.pushLayer_{
0149 0.02800 0.00000 2 > 32: PUSH_LAYER - Layer_Annotations
0150 0.02800 0.00000 2 }
0151 0.03000 0.00200 2 ApgCii.#drawAnnotation{
0152 0.03000 0.00000 2 > 33: DRAW_ANNOTATION
0153 0.03000 0.00000 3 ApgCii.#get2PointsByNames{
0154 0.03000 0.00000 4 ApgCii.#getPointsByNames{
0155 0.03000 0.00000 4 }
0156 0.03000 0.00000 3 }
0157 0.03000 0.00000 2 }
0158 0.03000 0.00000 2 ApgCii.popLayer_{
0159 0.03000 0.00000 2 > 34: POP_LAYER
0160 0.03000 0.00000 2 }
0161 0.03000 0.00000 2 ApgCii.pushLayer_{
0162 0.03200 0.00200 2 > 35: PUSH_LAYER - Layer_Debug
0163 0.03200 0.00000 2 }
0164 0.03200 0.00000 2 ApgCii.drawAllPointsWithInfo_{
0165 0.03200 0.00000 2 > 36: DRAW_ALL_POINTS
0166 0.03200 0.00000 2 }
0167 0.03200 0.00000 1 }

Instructions

{"type":"SETUP_BEGIN"}
{"type":"SET_NAME", "name":"Dimensions & annotations"}
{"type":"SETUP_END"}
{"type":"PUSH_LAYER", "name":"Layer_Dimensions"}
{"type":"NEW_POINT", "name":"P1", "x":500, "y":3500}
{"type":"NEW_POINT", "name":"P2", "x":1800, "y":3000}
{"type":"DRAW_LIN_DIM", "points":["P1", "P2"], "text":["", "Algn"], "radious":200}
{"type":"DRAW_LIN_DIM", "points":["P2", "P1"], "radious":200, "text":[" ", "Vert"], "payload":{"type":1}}
{"type":"DRAW_LIN_DIM", "points":["P1", "P2"], "radious":200, "text":[" ", "Horz"], "payload":{"type":0}}
{"type":"NEW_POINT", "name":"P3", "x":500, "y":1500}
{"type":"NEW_POINT", "name":"P4", "x":1800, "y":1000}
{"type":"DRAW_LIN_DIM", "points":["P4", "P3"], "text":["", "Algn"], "radious":200}
{"type":"DRAW_LIN_DIM", "points":["P4", "P3"], "radious":200, "text":[" ", "Vert"], "payload":{"type":1}}
{"type":"DRAW_LIN_DIM", "points":["P4", "P3"], "radious":200, "text":[" ", "Horz"], "payload":{"type":0}}
{"type":"NEW_POINT", "name":"PAD1", "x":4000, "y":2000}
{"type":"NEW_POINT", "name":"PAD2", "x":4600, "y":1400}
{"type":"DRAW_ARC_DIM", "points":["PAD1", "PAD2"], "radious":-200, "text":[" ", "Horz"], "payload":{"type":5}}
{"type":"DRAW_ARC_DIM", "points":["PAD1", "PAD2"], "radious":-200, "text":[" ", "Vert"], "payload":{"type":4}}
{"type":"DRAW_ARC_DIM", "points":["PAD1", "PAD2"], "radious":-200, "text":[" ", "OutD"], "payload":{"type":1}}
{"type":"DRAW_ARC_DIM", "points":["PAD1", "PAD2"], "radious":1000, "text":[" ", "InD"], "payload":{"type":0}}
{"type":"NEW_POINT", "name":"PAD3", "x":6000, "y":2000}
{"type":"NEW_POINT", "name":"PAD4", "x":6600, "y":1400}
{"type":"DRAW_ARC_DIM", "points":["PAD3", "PAD4"], "radious":200, "text":[" ", "OutR"], "payload":{"type":3}}
{"type":"DRAW_ARC_DIM", "points":["PAD3", "PAD4"], "radious":200, "text":[" ", "InR"], "payload":{"type":2}}
{"type":"POP_LAYER"}
{"type":"NEW_POINT", "name":"PA1", "x":1000, "y":100}
{"type":"NEW_POINT", "name":"PA2", "x":1500, "y":500}
{"type":"PUSH_LAYER", "name":"Layer_Zero"}
{"type":"DRAW_CIRCLE", "origin":"PAD1", "radious":848.5}
{"type":"DRAW_CIRCLE", "origin":"PAD3", "radious":848.5}
{"type":"POP_LAYER"}
{"type":"PUSH_LAYER", "name":"Layer_Annotations"}
{"type":"DRAW_ANNOTATION", "points":["PA1", "PA2"], "text":["Annotation", "Test", "Multiline", "Will work?"]}
{"type":"POP_LAYER"}
{"type":"PUSH_LAYER", "name":"Layer_Debug"}
{"type":"DRAW_ALL_POINTS", "radious":10}

CAD State

settings

{
  "name": "Dimensions & annotations",
  "viewBox": {
    "canvasWidth": 1000,
    "canvasHeight": 562.5,
    "viewPortWidth": 10000,
    "viewPortHeight": 5625,
    "originXDisp": 1000,
    "originYDisp": 562.5
  },
  "background": {
    "draw": true,
    "strokeWidth": 4,
    "strokeColor": "#888888",
    "fillColor": "white"
  },
  "foreGround": {
    "draw": true,
    "strokeWidth": 4,
    "strokeColor": "black",
    "fillColor": "black"
  },
  "grid": {
    "mode": "Lines",
    "gridStep": 100,
    "gridStroke": {
      "color": "green",
      "width": 1,
      "dashPattern": [
        10,
        90
      ],
      "dashOffset": 5
    },
    "drawMajors": true,
    "majorEvery": 1000,
    "majorGridStroke": {
      "color": "cyan",
      "width": 2,
      "dashPattern": [
        10,
        90
      ],
      "dashOffset": 5
    }
  },
  "cartesians": {
    "mode": "Normal",
    "axisStroke": {
      "color": "#888888",
      "width": 4
    },
    "drawTicks": true,
    "tickStroke": {
      "color": "cyan",
      "width": 2
    },
    "ticksStep": 100,
    "ticksSize": 25,
    "drawBigTicks": true,
    "bigTicksEvery": 1000,
    "bigTicksSize": 50,
    "drawBigTicksLables": true,
    "labelsTextStyleName": "CartesianLabel",
    "labelsStyle": {
      "font": "Courier New, Courier, monospace",
      "size": 100,
      "anchor": "middle",
      "italic": true,
      "aspectRatio": 0.6,
      "fill": {
        "color": "#888888",
        "opacity": 1
      }
    }
  },
  "debug": false
}

strokeStyles

[
  "None",
  "Background",
  "Foreground",
  "Grids",
  "Cartesian",
  "Debug",
  "Annotations",
  "Dimensions",
  "Symmetry",
  "Symmetry_Large",
  "Dotted",
  "DottedLarge",
  "Hidden",
  "HiddenLarge",
  "Cartouche",
  "HatchGray",
  "HatchBrown",
  "HatchGreen"
]

fillStyles

[
  "None",
  "Background",
  "Foreground",
  "Debug",
  "Hidden",
  "Dimensions",
  "Annotations",
  "Cartouche"
]

textStyles

[
  "Default",
  "Debug",
  "Mono",
  "Title",
  "Dimensions",
  "Annotations",
  "CartesianLabel"
]

gradients

[
  "LinearLeftToRightLightShadow",
  "LinearLeftToRightDarkShadow",
  "LinearTopToDownLightShadow",
  "LinearTopToDownDarkShadow"
]

patterns

[
  "BackGridLines",
  "BackGridLinesAsDots",
  "CartesianHorizontal",
  "CartesianVertical",
  "Cross1",
  "Cross2",
  "Saltire1",
  "Saltire2",
  "Diagonal1",
  "Diagonal2",
  "Floor1",
  "Floor2",
  "Brick1",
  "Brick2",
  "Roof1",
  "Roof2",
  "RoofTiles1",
  "RoofTiles2"
]

textures

[
  "Wood_Ash",
  "Wood_Oak"
]

blocks

[
  "mechArrow",
  "simpleArrow",
  "archArrow",
  "dotArrow"
]

layers

[
  "Layer_Background",
  "Layer_Grids",
  "Layer_Cartesians",
  "Layer_Annotations",
  "Layer_Dimensions",
  "Layer_Debug",
  "Layer_Hidden",
  "Layer_Zero",
  "Layer_Cartouche"
]

groups

[]